<template>
  <el-table :data="pers" style="width: 100%">
    <el-table-column type="expand">
      <template #default="props">
        <div m="4">
          <p m="t-0 b-2">描述: {{ props.row.per_description }}</p>
        </div>
      </template>
    </el-table-column>
    <el-table-column label="结果" prop="answer" />
  </el-table>
</template>

<script lang="ts" setup>
import { ref } from "vue"
import { request } from "@/utils/service"
type personality = {
  answer: string
  per_description: string
}
const pers = ref<personality[]>([])
request({
  url: "/personality",
  method: "get"
}).then((resp) => {
  pers.value = resp.data.pers
  console.log(pers)
})
</script>
